#ifndef CLINE_H_
#define CLINE_H_

#include <windows.h>
#include <iostream>
#include <list>


#define WINDOW_HEIGHT 600
#define WINDOW_WIDTH  800

#define INFINITY 10 // it's close isn't it ? 
#define SOLID  0
#define VISUAL 1

using namespace std ;

class CLine
{
public :
	// constructor
	CLine( ){};

private :

	// y = a*x + b form
	float a ; 
	float b ;

	// begin and end point of the line
	// begin.x <= end.x
	POINT begin ;
	POINT end   ;

public :

	// create a line according to 2 points
	void makeLine( POINT departure , POINT arrival , int type = SOLID);

	void Seta();
	void Setb();

	float Geta(){ return a ; };
	float Getb(){ return b ; };

	POINT Getbegin(){ return begin ; } ;
	POINT Getend()  { return end   ; } ;

	int type ;

	// Drawing function
	void Draw(HDC hdc);

	// Lines collisions 
	bool LineCollision( CLine line ) ; 

};

#endif 